package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.TestVideo;
import com.ruoyi.domain.vo.TestVideoVo;
import com.ruoyi.mapper.TestVideoMapper;
import com.ruoyi.service.ITestVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考试平台视频Service业务层处理
 *
 */
@Service
public class TestVideoServiceImpl extends ServiceImpl<TestVideoMapper,TestVideo> implements ITestVideoService
{
    @Autowired
    private TestVideoMapper testVideoMapper;

    /**
     * 查询考试平台视频列表
     *
     * @param grade 年级
     * @return 考试平台视频
     */
    @Override
    public List<TestVideoVo> selectTestVideoList(String grade)
    {
        return testVideoMapper.selectTestVideoList(grade);
    }

    /**
     * 新增考试平台视频
     *
     * @param testVideo 考试平台视频
     * @return 结果
     */
    @Override
    public int insertTestVideo(TestVideo testVideo)
    {
        return testVideoMapper.insertTestVideo(testVideo);
    }

    /**
     * 修改考试平台视频
     *
     * @param testVideo 考试平台视频
     * @return 结果
     */
    @Override
    public int updateTestVideo(TestVideo testVideo)
    {
        return testVideoMapper.updateTestVideo(testVideo);
    }

    /**
     * 批量删除考试平台视频
     *
     * @param videoIds 需要删除的考试平台视频主键
     * @return 结果
     */
    @Override
    public int deleteTestVideoByVideoIds(Long[] videoIds)
    {
        return testVideoMapper.deleteTestVideoByVideoIds(videoIds);
    }

    /**
     * 删除考试平台视频信息
     *
     * @param videoId 考试平台视频主键
     * @return 结果
     */
    @Override
    public int deleteTestVideoByVideoId(Long videoId)
    {
        return testVideoMapper.deleteTestVideoByVideoId(videoId);
    }
}
